package com.base.springboot.starter.mybatisplus.domain;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.FieldNameConstants;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * MybatisPlus entity 封装类
 *
 * @author admin
 * @date 2020/5/19 AM10:15
 */
@Data
@FieldNameConstants
public class GenericBaseEntity extends Model implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 数据库 主键
     */
    @ApiModelProperty(value = "主键id")
    protected Long id;

    @ApiModelProperty(value = "创建者ID")
    private String createEmp;

    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改人ID")
    private String modifyEmp;

    @ApiModelProperty(value = "修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime modifyTime;

    @ApiModelProperty(value = "创建者name")
    private String createEmpName;

    @ApiModelProperty(value = "修改人NAME")
    private String modifyEmpName;

    @ApiModelProperty(value = "备注")
    private String remark;

    @ApiModelProperty(value = "删除标记")
    @TableLogic
    private Integer delFlag;
}
